package
{
    import flash.events.Event;
    import flash.events.MouseEvent;
    
    import mx.controls.Alert;
    
    import net.akabana.fchelper.View;
    
    import spark.components.Button;
    import spark.components.TextInput;
    
    public class ContentsView extends View{

        [SkinPart]
        public var logoff:Button;
        
        [SkinPart]
        public var memo1_detail:TextInput;
        
        [SkinPart]
        public var memo1_save:Button;
        
        public function ContentsView(){
            super();
        }

        protected override function creationCompleted():void{
            logoff.addEventListener(MouseEvent.CLICK,logoffClickHandler);
            memo1_save.addEventListener(MouseEvent.CLICK,memoSaveClickHandler);
        }
        
        private function logoffClickHandler(event:MouseEvent):void{
			trace("[EVENT]",event);
            dispatchEvent(new Event("logoff",true));
        }

        private function memoSaveClickHandler(event:MouseEvent):void{
            trace("[MEMO]",memo1_detail.text);
			Alert.show(memo1_detail.text,"[MEMO]");
        }
    }
}